/* 面相分析页面样式 */
.face-analysis-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 页面标题 */
.page-header {
  text-align: center;
  margin-bottom: 30px;
}

.page-header h1 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 10px;
}

.page-header p {
  font-size: 1.1rem;
  color: #666;
}

/* 标签页导航 */
.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  border-bottom: 2px solid #eee;
}

.tab {
  padding: 12px 24px;
  font-size: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  margin: 0 5px;
  border-radius: 8px 8px 0 0;
  transition: all 0.3s ease;
  color: #666;
}

.tab:hover {
  background-color: #f5f5f5;
}

.tab.active {
  background-color: #4a90e2;
  color: white;
  font-weight: bold;
}

.tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 内容区域 */
.content-area {
  min-height: 500px;
}

/* 分析面板 */
.analysis-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.upload-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.upload-section h2 {
  margin-top: 0;
  color: #333;
  font-size: 1.5rem;
}

.instructions {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.upload-container {
  margin-bottom: 20px;
}

.upload-placeholder {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #fafafa;
}

.upload-placeholder:hover {
  border-color: #4a90e2;
  background-color: #f0f8ff;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.file-info {
  color: #999;
  font-size: 0.9rem;
  margin-top: 10px;
}

.image-preview {
  position: relative;
  display: inline-block;
}

.image-preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.remove-btn:hover {
  background: rgba(255, 0, 0, 0.8);
  color: white;
}

.analyze-btn {
  width: 100%;
  padding: 15px;
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.analyze-btn:hover:not(:disabled) {
  background-color: #357ae8;
}

.analyze-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.features-info {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.features-info h3 {
  margin-top: 0;
  color: #333;
  font-size: 1.5rem;
}

.features-info ul {
  list-style-type: none;
  padding: 0;
}

.features-info li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  color: #555;
}

.features-info li:last-child {
  border-bottom: none;
}

.features-info li:before {
  content: "✓";
  color: #4a90e2;
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-right: 10px;
}

/* 结果面板 */
.result-panel {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.result-header h2 {
  margin: 0;
  color: #333;
  font-size: 2rem;
}

.result-score {
  text-align: center;
}

.score-label {
  display: block;
  font-size: 1rem;
  color: #666;
  margin-bottom: 5px;
}

.score-value {
  display: block;
  font-size: 2.5rem;
  font-weight: bold;
  color: #4a90e2;
}

.result-section {
  margin-bottom: 30px;
}

.result-section h3 {
  color: #333;
  font-size: 1.4rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.overall-impression {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
}

.facial-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.feature-item {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feature-item h4 {
  margin-top: 0;
  color: #4a90e2;
}

.feature-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin: 10px 0;
  color: #333;
}

.feature-desc {
  color: #666;
  line-height: 1.5;
}

.personality-traits {
  list-style-type: none;
  padding: 0;
}

.trait-item {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  color: #555;
  font-size: 1.05rem;
}

.trait-item:last-child {
  border-bottom: none;
}

.career-advice,
.relationship-advice,
.health-recommendations {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
}

.lucky-elements {
  display: flex;
  gap: 30px;
  align-items: center;
}

.lucky-item {
  text-align: center;
}

.lucky-label {
  display: block;
  font-size: 1rem;
  color: #666;
  margin-bottom: 10px;
}

.lucky-color {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.lucky-number {
  font-size: 3rem;
  font-weight: bold;
  color: #4a90e2;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #eee;
}

.save-btn,
.re-analyze-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.save-btn {
  background-color: #4a90e2;
  color: white;
}

.save-btn:hover {
  background-color: #357ae8;
}

.re-analyze-btn {
  background-color: #f0f0f0;
  color: #333;
}

.re-analyze-btn:hover {
  background-color: #e0e0e0;
}

/* 历史记录面板 */
.history-panel {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.history-panel h2 {
  margin-top: 0;
  color: #333;
  font-size: 1.8rem;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.history-item {
  display: flex;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.history-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.history-image {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.history-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-details {
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.history-score {
  text-align: right;
}

.history-date {
  color: #999;
  font-size: 0.9rem;
  margin: 10px 0;
}

.view-btn {
  align-self: flex-end;
  padding: 8px 16px;
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.view-btn:hover {
  background-color: #357ae8;
}

.no-history {
  text-align: center;
  padding: 50px 0;
}

.no-history p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 20px;
}

.start-analysis-btn {
  padding: 12px 30px;
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.start-analysis-btn:hover {
  background-color: #357ae8;
}

/* 错误消息 */
.error-message {
  color: #e74c3c;
  background-color: #fdf2f2;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 10px;
  margin: 15px 0;
  text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .face-analysis-page {
    padding: 15px;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .analysis-panel {
    grid-template-columns: 1fr;
  }
  
  .facial-features {
    grid-template-columns: 1fr;
  }
  
  .result-header {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  
  .lucky-elements {
    flex-direction: column;
    gap: 20px;
  }
  
  .history-list {
    grid-template-columns: 1fr;
  }
  
  .result-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .save-btn,
  .re-analyze-btn {
    width: 100%;
  }
}